import request from '@/utils/request'

// 查询风险事件列表
export function listEvent(query) {
  return request({
    url: '/aqsc/riskevent/list',
    method: 'get',
    params: query
  })
}

// 查询风险事件详细
export function getEvent(eventId) {
  return request({
    // url: '/scyf/riskevent/' + parseStrEmpty(eventId),
    url: '/aqsc/riskevent/' + eventId,
    method: 'get'
  })
}

// 新增风险事件
export function addEvent(data) {
  return request({
    url: '/aqsc/riskevent',
    method: 'post',
    data: data
  })
}

// 修改风险事件
export function updateEvent(data) {
  return request({
    url: '/aqsc/riskevent',
    method: 'put',
    data: data
  })
}

// 删除风险事件
export function delEvent(eventId) {
  return request({
    url: '/aqsc/riskevent/' + eventId,
    method: 'delete'
  })
}


//获取UnitList

//获取MeasureList
export function listMeasure(query) {
  return request({
    url: '/aqsc/riskevent/list',
    method: 'get',
    params: query
  })
}


